i = int(input())
pay = 0
if i <= 3000:
    pay = 2000
    print(pay)
elif i <= 7000:
    pay = i * 0.1 + 2000
    print(pay)
elif i <= 10000:
    pay = i * 0.15
    print(pay)
elif i > 10000:
    pay = i * 0.2 + 2000
    print(pay)
